﻿<form class="" onsubmit="return false;">
    <div class="row">
        <div class="large-2 columns">
            <label for="newRequest-template">Template</label>
            <select id="newRequest-template" data-bind="value: template">
                <option value="">Select template</option>
                <optgroup label="Tables">
                    <option value="tables.createTable">Create table</option>
                    <option value="tables.queryTables">Query tables</option>
                    <option value="tables.deleteTable">Delete table</option>
                    <option value="tables.query">Query entities</option>
                    <option value="tables.deleteEntity">Delete entity</option>
                </optgroup>
                <optgroup label="Blobs">
                    <option value="blobs.createContainer">Create container</option>
                    <option value="blobs.listContainers">List containers</option>
                    <option value="blobs.leaseContainer">Lease container</option>
                    <option value="blobs.deleteContainer">Delete container</option>
                    <option value="blobs.listBlobs">List blobs</option>
                    <option value="blobs.getBlob">Get blob</option>
                    <option value="blobs.leaseBlob">Lease blob</option>
                    <option value="blobs.deleteBlob">Delete blob</option>
                </optgroup>
                <optgroup label="Queues">
                    <option value="queues.create">Create queue</option>
                    <option value="queues.list">List queues</option>
                    <option value="queues.delete">Delete queue</option>
                    <option value="queues.getMessages">Get messages</option>
                    <option value="queues.peekMessages">Peek messages</option>
                </optgroup>
            </select>
        </div>
        <div class="large-10 columns">
        </div>
    </div>
    <div class="row">
        <div class="large-1 columns">
            <label for="newRequest-verb">Verb</label>
            <select id="newRequest-verb" data-bind="value: verb">
                <option value="GET">GET</option>
                <option value="POST">POST</option>
                <option value="PUT">PUT</option>
                <option value="DELETE">DELETE</option>
            </select>
        </div>
        <div class="large-1 columns">
            <label for="newRequest-protocol">Protocol</label>
            <select id="newRequest-protocol" data-bind="value: protocol">
                <option value="https">https://</option>
                <option value="http">http://</option>
            </select>
        </div>
        <div class="large-3 columns">
            <label for="newRequest-host">Host</label>
            <select id="newRequest-host" data-bind="value: host">
                <option data-bind="text: tablesHost"></option>
                <option data-bind="text: blobsHost"></option>
                <option data-bind="text: queuesHost"></option>
            </select>
        </div>
        <div class="large-7 columns">
            <label for="newRequest-path">Path</label>
            <input id="newRequest-path" type="text" data-bind="value: path" />
        </div>

    </div>
    <div class="row">
        <div class="large-2 columns">
            <label for="newRequest-comp">Comp</label>
            <select id="newRequest-comp" data-bind="value: comp">
                <option value="">None</option>
                <option value="list">List</option>
                <option value="page">Page</option>
                <option value="lease">Lease</option>
            </select>
            <label for="newRequest-timeout">Timeout</label>
            <input id="newRequest-timeout" type="number" data-bind="value: timeout">
            <!-- ko if: hasLeaseAction -->
            <label for="newRequest-leaseaction">Lease action</label>
            <select id="newRequest-leaseaction" data-bind="value: leaseAction">
                <option value="">None</option>
                <option value="acquire">Acquire</option>
                <option value="renew">Renew</option>
                <option value="change">Change</option>
                <option value="release">Release</option>
                <option value="break">Break</option>
            </select>
            <!-- /ko -->
        </div>
        <div class="large-2 columns">
            <label for="newRequest-version">Version</label>
            <select id="newRequest-version" data-bind="value: version">
                <option value="2012-02-12">2012-02-12</option>
                <option value="2011-08-18">2011-08-18</option>
                <option value="2009-09-19">2009-09-19</option>
                <option value="2009-07-17">2009-07-17</option>
            </select>
        </div>
        <div class="large-2 columns">
            <label for="newRequest-authorization">Authorization</label>
            <select id="newRequest-authorization" data-bind="value: authorization">
                <option value="SharedKey">SharedKey (blobs & queue)</option>
                <option value="SharedKeyTables">SharedKey (tables)</option>
                <option value="SharedKeyLite">SharedKeyLite (blobs & queue)</option>
                <option value="SharedKeyLiteTables">SharedKeyLite (tables)</option>
            </select>
        </div>
        <div class="large-6 columns">
        </div>
    </div>

    <div class="row">
        <div class="large-2 columns">
            <a href="javascript:void(0)" class="button" data-bind="click: execute">Execute</a>
        </div>
    </div>
    <div class="row" data-bind="with: record">
        <div class="large-6 columns">
            @Html.Partial("Console/RequestData")
            <div data-bind="with: $parent.lastExecuted">
                @Html.Partial("Console/ResponseData")
            </div>
        </div>
        <div class="large-6 columns">
            @Html.Partial("Console/Signature")
        </div>
    </div>
</form>
